/*
 * @Description: 更新日志操作组件
 * @Author: Rfan
 * @Date: 2022-06-11 09:59:07
 * @LastEditTime: 2022-06-11 15:07:46
 */
import { Button, Space } from 'antd';
import { useMemo, useState } from 'react';
import AddDialog from './dialogs/AddDialog';

const Operate = () => {
  const [logVisible, setLogVisible] = useState(false);

  return (
    <>
      <div className="filter-container">
        <p className="page-title">更新日志设置</p>
        <Space size="small">
          <Button
            onClick={() => {
              setLogVisible(true);
            }}
          >
            添加更新日志
          </Button>
        </Space>
      </div>
      {useMemo(
        () => (
          <AddDialog
            visible={logVisible}
            onClose={() => {
              setLogVisible(false);
            }}
          />
        ),
        [logVisible]
      )}
    </>
  );
};

export default Operate;
